// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;

namespace SnapObjects.Expressions
{
    internal class MethodNotSupportedException : NotSupportedException
    {
        public MethodNotSupportedException(string name)
            : base(String.Format(Resources.METHOD_NOTSUPPORED, name))
        {
        }
    }

    internal class IdentifierNotSupportedException : NotSupportedException
    {
        public IdentifierNotSupportedException(string name)
            : base(String.Format(Resources.IDENTIFIER_NOTSUPPORED, name))
        {
        }
    }

    internal class InternalParseException : InvalidOperationException
    {
        public InternalParseException(string message) : base(message)
        {
        }
    }

    internal class TypeMatchException : TypeAccessException
    {
        public TypeMatchException(Type left, Type right)
            : base(String.Format(Resources.TYPE_NOTMATCH, left.FullName, right.FullName))
        {
        }
    }

    internal class StringInvalidOperationException : InvalidOperationException
    {
        public StringInvalidOperationException(Type leftType, Type rightType)
            : base(String.Format(Resources.CONDITION_TYPEERROR, leftType.FullName, rightType.FullName))
        {
        }
    }
}
